<template>
  <div>
    <van-field readonly label="危害因素" type="text" :value="form.HazardFactors"></van-field>
    <van-field readonly label="防护用品" type="text" :value="form.ProtectArticles"></van-field>
    <van-field readonly label="技术措施" type="text" :value="form.TechnicalMeasures"></van-field>
    <van-field readonly label="体检频次" type="text" :value="form.InspectFrequency"></van-field>
    <van-field readonly label="接害人数" type="text" :value="form.HurtPersonCount"></van-field>
  </div>
</template>
<script>
import { nsOccupationalDiseasesReasonDetail } from "@/api/ns";

export default {
  data() {
    return {
      id: this.$route.query.id,
      autoSize: { minRows: 1 },
      form: {}
    };
  },
  created() {
    this.getDetail();
  },
  methods: {
    getDetail() {
      var me = this;
      let params = { id: this.id };
      nsOccupationalDiseasesReasonDetail(params).then(res => {
        me.form = res.data;
        me.form.TypeList = me.form.Type == null ? [] : me.form.Type.split(",");
      });
    }
  }
};
</script>